Skip to content

chore: mechanical black/ruff normalization of remaining test files (2/2)#679

Merged
igerber merged 1 commit into
mainfrom
chore/lint-normalization-tests
Jul 12, 2026
Merged

chore: mechanical black/ruff normalization of remaining test files (2/2)#679
igerber merged 1 commit into
mainfrom
chore/lint-normalization-tests

Conversation

@igerber

@igerber igerber commented Jul 12, 2026

Copy link
Copy Markdown
Owner

Summary

  • Part 2 of 2 of the repo-wide lint normalization (part 1: chore: pin lint tooling + normalize source and hand-fixed test files (1/2) #677, which carries the tool pins, per-file-ignores, source normalization, and all hand fixes). Split so each PR fits the AI reviewer's 1MB input cap.
  • This PR is purely mechanical: the verbatim output of ruff check tests --fix + black tests at the pinned versions (black==26.3.1, ruff==0.15.13) for the 37 test files that needed no hand edits - import sorts, f-string prefixes, unused-import removal, formatting. No assertion, fixture, or behavior changes; zero judgment calls.
  • Reproduce: install the pinned tools and run the two commands above on these files; the diff is byte-identical.
  • CHANGELOG: the entry covering the full normalization (both parts) lands with chore: pin lint tooling + normalize source and hand-fixed test files (1/2) #677 to avoid two PRs editing the same [Unreleased] block.

Methodology references (required if estimator / math changes)

  • Method name(s): N/A - no methodology changes (test formatting only)
  • Paper / source link(s): N/A
  • Any intentional deviations from the source (and why): None

Validation

  • Tests added/updated: formatting-only changes to 37 test files; black output is AST-equivalent and the ruff fixes here are import sorts / f-prefix / dead-import removals.
  • Backtest / simulation / notebook evidence (if applicable): N/A

Security / privacy

  • Confirm no secrets/PII in this PR: Yes

Generated with Claude Code

🤖 Generated with Claude Code

https://claude.ai/code/session_01Lbd6nqWmg4snvvBmegwqiw

Verbatim output of `ruff check tests --fix` + `black tests` at the pinned
versions (black==26.3.1, ruff==0.15.13; pinned in #677) for the 37 test
files with no hand edits: import sorts, f-string prefixes, unused-import
removal, formatting. No assertion or fixture changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lbd6nqWmg4snvvBmegwqiw
@github-actions

Copy link
Copy Markdown

Overall Assessment

✅ Looks good — no unmitigated P0/P1 findings.

Executive Summary

  • The diff is limited to test files and appears mechanical: formatting, import sorting, unused-import removal, and string wrapping.
  • No estimator implementation, weighting, variance/SE logic, identification assumptions, or defaults are changed.
  • Methodology registry contract around joint inference fields remains relevant and unchanged; representative NaN inference tests still assert the expected behavior (docs/methodology/REGISTRY.md:L5, tests/test_diagnostics.py:L775-L831).
  • I found no new inline inference anti-pattern in production code and no partial NaN guard regression in the changed surface.
  • I did not run full pytest; I did AST-parse the listed changed test files successfully.

Methodology

  • Severity: P3-informational
    Impact: No methodology-affecting code changed. The affected estimators are only referenced by tests; the PR does not alter estimator math, assumptions, SEs, weights, defaults, or documented deviations. Representative R parity helper changes are string delimiter/formatting only (tests/test_methodology_callaway.py:L496-L534).
    Concrete fix: None required.

Code Quality

  • Severity: P3-informational
    Impact: Formatting and import cleanup are consistent with black/ruff normalization. Removed imports appear unused; import reorder in tests/test_efficient_did_validation.py:L13-L18 is not behavior-changing.
    Concrete fix: None required.

Performance

  • Severity: P3-informational
    Impact: No production or test algorithm changes observed. Runtime impact should be negligible.
    Concrete fix: None required.

Maintainability

  • Severity: P3-informational
    Impact: The PR improves style consistency across a broad set of tests without changing assertions.
    Concrete fix: None required.

Tech Debt

  • Severity: P3-informational
    Impact: No new deferred work or TODO debt introduced. Existing TODO/registry items are not affected.
    Concrete fix: None required.

Security

  • Severity: P3-informational
    Impact: No secrets, credential material, workflow execution changes, or security-sensitive code changes found in the diff.
    Concrete fix: None required.

Documentation/Tests

  • Severity: P3-informational
    Impact: Test files were reformatted only. Assertion semantics appear preserved, including NaN inference checks and failure-message literals such as tests/test_two_stage.py:L1815-L1818.
    Concrete fix: None required.

@igerber igerber added the ready-for-ci Triggers CI test workflows label Jul 12, 2026
@igerber igerber merged commit 590d568 into main Jul 12, 2026
31 of 32 checks passed
@igerber igerber deleted the chore/lint-normalization-tests branch July 12, 2026 17:00
igerber added a commit that referenced this pull request Jul 12, 2026
…docs

- .github/workflows/lint.yml: runs `ruff check` + `black --check` at the
  pyproject-pinned versions on every PR push and on pushes to main. No
  ready-for-ci gate (precedent: ai_pr_review.yml), no paths filter (a
  required check whose workflow never triggers would block PRs forever).
  Aggregate "Lint Gate" job (if: always(), inspects needs.*.result) gives
  branch protection a single stable required-check name. Check-only.
- .git-blame-ignore-revs: the #677/#679 normalization squash SHAs.
- CONTRIBUTING.md "Linting and Formatting" section + CLAUDE.md note.
- TestLintWorkflowPinSync: executable ruff/black pin-sync guard between
  lint.yml and the pyproject dev extra (review round-2 P3).
- lint.yml added to rust-test.yml push/pull_request path filters, locked
  by PIN_SYNC_WORKFLOWS assertions; docs distinguish the current
  ruff/black mirroring from the future mypy CI job (round-3 P3s).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Lbd6nqWmg4snvvBmegwqiw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-ci Triggers CI test workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant